12# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
N = int(49)
i = 0

while(1):
    guess_in = int(input("请输入要猜的年龄: \n "))
    if(guess_in == N):
        print("恭喜你猜对了")
        break
    elif(i == 2):
        str_in = input("您的机会已经用完了，是否续命？Y/N \n")
        if(str_in == 'N' or 'n'):
            break
        i = 0
    else:
        print("对不起猜错了!")
        i = i + 1
        